package com.gao.xml.jaxb.xml;

import com.gao.xml.jaxb.adapter.AdapterCdata;
import com.sun.xml.internal.txw2.annotation.XmlCDATA;
import lombok.Data;

import javax.xml.bind.annotation.*;
import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;

/**
 * @author GaoXi
 * @date 2021/8/18 14:05
 */
@Data
@XmlRootElement
@XmlAccessorType(XmlAccessType.NONE)
@XmlAccessorOrder(XmlAccessOrder.ALPHABETICAL)
//同时出现以@XmlType为准
/*@XmlType(propOrder = {
  "value" , "name"
})*/
public class User {


    @XmlAttribute
    private String color ="Red";

    @XmlElement
    @XmlJavaTypeAdapter(AdapterCdata.class)
    private String value ="高溪--》";
    @XmlElement
    private String name="gaoxi";

    @XmlElement
    private IdEntity id = new IdEntity();


}
